package nimbus.utils
{
	
	public function getSingletonByDefinition(classObject:Class):Object
	{
		if(singletonInstances[classObject] == null)
		{
			singletonInstances[classObject] = true;
			singletonInstances[classObject] = new classObject();
		}
		
		return singletonInstances[classObject];
	}
	
}

import flash.utils.Dictionary;

var singletonInstances:Dictionary = new Dictionary(true);
